<html>
<head><meta charset="utf-8"><title>arenas and alloc_from_iter · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/arenas.20and.20alloc_from_iter.html">arenas and alloc_from_iter</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213327658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/arenas%20and%20alloc_from_iter/near/213327658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/arenas.20and.20alloc_from_iter.html#213327658">(Oct 14 2020 at 17:47)</a>:</h4>
<p>Does anybody know, why <code>TypedArena::alloc_from_iter</code> doesn't look at the <code>size_hint()</code> of the input iterator, and <code>DroplessArena::alloc_from_iter</code> does? TA instead always copies the input to a SmallVec, which <em>smells</em> less efficient than a match on <code>size_hint</code></p>



<a name="213328019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/arenas%20and%20alloc_from_iter/near/213328019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/arenas.20and.20alloc_from_iter.html#213328019">(Oct 14 2020 at 17:50)</a>:</h4>
<p>probably no one thought of it :P</p>



<a name="213328026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/arenas%20and%20alloc_from_iter/near/213328026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/arenas.20and.20alloc_from_iter.html#213328026">(Oct 14 2020 at 17:50)</a>:</h4>
<p>try adding it and see if it helps perf</p>



<a name="213328258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/arenas%20and%20alloc_from_iter/near/213328258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dániel Buga <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/arenas.20and.20alloc_from_iter.html#213328258">(Oct 14 2020 at 17:52)</a>:</h4>
<p>I'm thinking about that but I feel like I'm responsible for way more of the perf runs than I should be <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="213328291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/arenas%20and%20alloc_from_iter/near/213328291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/arenas.20and.20alloc_from_iter.html#213328291">(Oct 14 2020 at 17:52)</a>:</h4>
<p>that's not a bad thing :)</p>



<a name="213328309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/arenas%20and%20alloc_from_iter/near/213328309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/arenas.20and.20alloc_from_iter.html#213328309">(Oct 14 2020 at 17:52)</a>:</h4>
<p>you might be interested in <a class="stream" data-stream-id="247081" href="/#narrow/stream/247081-t-compiler.2Fperformance">#t-compiler/performance</a> btw</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>